#ifndef LOGIN_H
#define LOGIN_H

#include <QWidget>
#include "forgetpassword.h"
#include "chat.h"
#include <QSqlDatabase>
#include<qmessagebox.h>
#include<QFile>
#include<QSettings>
#include "widget.h"
#include <QLineEdit>
#include <QMessageBox>
#include <QSqlQuery>
#include<QSqlRecord>
#include<QDateTime>
#include<QDebug>
class Widget;

namespace Ui {
class LogIn;
}


class LogIn : public QWidget
{
    Q_OBJECT

public:
    explicit LogIn(QWidget *parent = nullptr);
    ~LogIn();


private:
    Ui::LogIn *ui;
    ForgetPassword *forgetpassword;
    Chat *chat;
    Widget *wid;

    QSqlDatabase db;
    QSqlQuery query;
    QString sql;

    QString  AutoLogin;
    QString RemeberPasswd;

    void savecflag();
    void loginInit();

public:

    bool ispassword;
    bool isauto;
public slots:
    void on_login_clicked();



signals:
    void back(void);

private slots:

    void logInit();
    void on_remmberpassword_stateChanged(int);
    void on_uidComboBox_currentIndexChanged(int index);

    void on_autocheckBox_stateChanged(int arg1);
};

#endif // LOGIN_H
